﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace IDAL
{
    /// <summary>
    /// Interface for Book Management
    /// </summary>
    public interface IBook
    {
        /// <summary>
        /// Select All the books
        /// </summary>
        /// <returns>Collection of books</returns>
        IList<BookInfo> SelectAllBooks();

        /// <summary>
        /// Select the book by the ISBN
        /// </summary>
        /// <param name="isbn">The ISBN of a book</param>
        /// <returns>The book</returns>
        BookInfo SelectBooksByISBN(string isbn);

        /// <summary>
        /// Search the books according to the keyword
        /// </summary>
        /// <param name="keyWord">The Keyword</param>
        /// <returns>Collection of books</returns>
        IList<BookInfo> SelectBooksBySearch(string keyWord);

        /// <summary>
        /// Select Hot Books
        /// </summary>
        /// <returns>Collection of books</returns>
        IList<BookInfo> SelectHotBooks();

        /// <summary>
        /// Select New Books
        /// </summary>
        /// <returns>Collection of books</returns>
        IList<BookInfo> SelectNewBooks();

        /// <summary>
        /// Add a book
        /// </summary>
        /// <param name="book">The book</param>
        void InsertBook(BookInfo book);

        /// <summary>
        /// Update a book
        /// </summary>
        /// <param name="book">The book</param>
        void UpdateBook(BookInfo book);

        /// <summary>
        /// Disable a book, change the book state into disable
        /// </summary>
        /// <param name="isbn">The ISBN</param>
        void DisableBook(string isbn);
    }
}
 